Java.perform(function () {
    var context = Java.use("android.app.ActivityThread").currentApplication().getApplicationContext();
    var packageInfoObject = context.getPackageManager().getPackageInfo("com.xunmeng.pinduoduo", 0);

    console.log(context.getPackageName());
    console.log(packageInfoObject.versionCode.value);
});

// frida -UF  -l 8.hook_value.js